<template>
  <div>
<ArticleItem v-for="obj in artArr" :key="obj.art_id" :articleObj="obj"></ArticleItem>

  </div>
</template>

<script>
import ArticleItem from './components/ArticleItem.vue'
import { articleDetailAPI } from '@/api'
export default {
  data () {
    return {
      artArr: []
    }
  },
  props: {
    channelId: Number
  },
  components: {
    ArticleItem
  },
  async created () {
    // 文章详情
    const res = await articleDetailAPI(this.channelId)
    this.artArr = res.data.data.results
    console.log(res)
  }
}
</script>

<style>

</style>
